package com.chenxingnet.dao;

import com.chenxingnet.dto.Cars;
import com.chenxingnet.dto.CarsExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface CarsMapper {
    int countByExample(CarsExample example);

    int deleteByExample(CarsExample example);

    int deleteByPrimaryKey(Integer cid);

    int insert(Cars record);

    int insertSelective(Cars record);

    List<Cars> selectByExample(CarsExample example);

    Cars selectByPrimaryKey(Integer cid);

    int updateByExampleSelective(@Param("record") Cars record, @Param("example") CarsExample example);

    int updateByExample(@Param("record") Cars record, @Param("example") CarsExample example);

    int updateByPrimaryKeySelective(Cars record);

    int updateByPrimaryKey(Cars record);
    
    int updateById(@Param("cid")Integer cid);
    
    long getCount(); 
    
    List<Cars> selectAllByCount(@Param("startPos")int startPos,@Param("pageSize")int pageSize);

	List<Cars> getAllCars();
	
	List<Cars> selectByCommon(@Param("comCity") String comCity);
	//搜索
	List<Cars> souCars(@Param("soucar") String soucar);

	List<Cars> getCarsByChufadi(@Param("chufadi")String chufadi);

	List<Cars> getChexingnByDeparture(@Param("chufadi")String chufadi, @Param("mudi")String mudi);

	List<Cars> getQushuByDeparture(@Param("chufadi")String chufadi, @Param("mudi")String mudi, @Param("chexing")String chexing);

	List<Cars> getChangjiaByDeparture(@Param("chufadi")String chufadi, @Param("mudi")String mudi,@Param("chexing")String chexing, @Param("qushu")String qushu);

	List<Cars> getJiashiJiesuanByDeparture(@Param("chufadi")String chufadi, @Param("mudi")String mudi,@Param("chexing")String chexing, @Param("qushu")String qushu,@Param("changjiajiesuan") String changjiajiesuan);

}